I am currently writing guidelines for C++ programmers, and I am in doubt about how to place * and & in declarations.
I prefer to put the type modifier close to the type, such as in:
int& Foo()
{
int* a;
int& b = a;
}
This seems natural to me if declarations with modifiers are restricted to declare a single variable.
However, Dan Saks wrote in the C/C++ Users Journal Dec 95:
"I believe most C++ programmers put the *s and &s with the decl-specifier because that's the way Bjarne Stroustrup (the inventor of C++) has always done it. This, in fact, is usually the way you can tell a "real" C++ programmer from a C hack using C++. "Real" C++ programmers do it Stroustrup's way. Too bad he does it wrong."
I believe that there is no such thing as a "wrong way" do do it. It is simply a question of taste and style.
But I would very much like to hear opinions on which style would be preferable to not-so-experienced C++ programmers.